// JavaScript Document
function getUuid() {
		var vNow = new Date();
		var sNow = "";
		sNow += String(vNow.getFullYear());
		sNow += String(vNow.getMonth() + 1);
		sNow += String(vNow.getDate());
		sNow+="_";
		sNow += String(vNow.getHours());
		sNow += String(vNow.getMinutes());
		sNow += String(vNow.getSeconds());
		sNow += String(vNow.getMilliseconds());
	return sNow;
}

function insertOrder(dsl)
{
	
//	try{
			var jsbrj=new	AtiJsBridge();
			var para={};
			para.dsl=dsl;
					 
			jsbrj.exe(para,function(data){
				console.log(data);
			    
				
			});
				//mycallJava("submitx",$("#title").val(),$("#content").val(),dropIds);
	//	}catch(e)
//		{
//			alert(e);
//		}
	
}

function GetRandomNum(Min,Max)
{   
var Range = Max - Min;   
var Rand = Math.random();   
return(Min + Math.round(Rand * Range));   
}   
//var num = GetRandomNum(1,10);   
//alert(num);   
 

var chars = ['0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'];

function generateMixed(n) {
     var res = "";
     for(var i = 0; i < n ; i ++) {
         var id = Math.ceil(Math.random()*35);
         res += chars[id];
     }
     return res;
}




function refuseQ4(order_id)
{
	if(!confirm("确认要拒绝吗??"))
	return;
		 try{
	var ds=new AtiJsBridge();
	 
		ds.exe("$method=com.attilax.order.OrderService4jobus.refuse&$tbtype=sq&$trigger000=com.attilax.dataService.meta_data_pars_from_txt_trigger&$trigtime=after&order_id=$uuid"+"&user_id=$uid&$member_id=$uid&param1="+order_id,function(data){
			console.log("--r:"+data);
		 	alert("ok..返回结果:"+data);
			//	data=str2json(data);
			//	var tb=new TableV3("table1");
			//	tb.bindData(data);
		//   data=str2json(data);
		//　$("#table1_tmpl").tmpl(data).appendTo('#table1');	
	    //  $("#table1 tr").eq(1).hide(); //tr0 is head ,,tr1 is tmpl
			
		}
		
		
		); 
	}catch(e)
	{
		showErr(e);
	}	
}



function acceptQ4(order_id)
{
	if(!confirm("确认要接受吗??"))
	return;
		 try{
	var ds=new AtiJsBridge();
	 
		ds.exe("$method=com.attilax.order.OrderService4jobus.accept&$tbtype=sq&$trigger000=com.attilax.dataService.meta_data_pars_from_txt_trigger&$trigtime=after&order_id=$uuid"+"&user_id=$uid&$member_id=$uid&param1="+order_id,function(data){
			console.log("--r:"+data);
		 	alert("ok..返回结果:"+data);
			//	data=str2json(data);
			//	var tb=new TableV3("table1");
			//	tb.bindData(data);
		//   data=str2json(data);
		//　$("#table1_tmpl").tmpl(data).appendTo('#table1');	
	    //  $("#table1 tr").eq(1).hide(); //tr0 is head ,,tr1 is tmpl
			
		}
		
		
		); 
	}catch(e)
	{
		showErr(e);
	}	
}
